<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="profile.aspx.cs" Inherits="school_profile" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>School Profile</title>

    <script src="../include/js/form.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="bodyContentTop" runat="Server">
    <h1>
        School Profile</h1>
    <h3>
        Setting up school profile.</h3>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="Server">
    <div class="elements_inner_wrapper">
        <div id="contentBody">
            <div class="section">
                <div class="seperator">
                </div>
                <fieldset class="formouter">
                    <table cellpadding="3" cellspacing="3" width="100%">
                        <tr>
                            <td colspan="2">
                                <div class="row_curved" id="divSchoolList" runat="server" title="Example:UCSM, MIT, YTU">
                                    <label for="<%=ddlSchoolList.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Selected School Name" ID="Label2" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:DropDownList AutoPostBack="True" runat="server" ID="ddlSchoolList" OnSelectedIndexChanged="ddlSchoolList_SelectedIndexChanged"
                                                DataSourceID="ObjectDataSource1" DataTextField="ListText" DataValueField="ListValue" />
                                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="SIS.ENT.Listing"
                                                DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" SelectMethod="GetList"
                                                TypeName="SIS.BLL.ListingManager" UpdateMethod="Save">
                                                <SelectParameters>
                                                    <asp:Parameter DefaultValue="1" Name="ListType" Type="Int32" />
                                                </SelectParameters>
                                            </asp:ObjectDataSource>
                                            &nbsp;&nbsp;
                                            <asp:Button runat="server" ID="btnShowSchoolProfile" Text="Show" OnClick="btnShowSchoolProfile_Click" />
                                            &nbsp;&nbsp;
                                            <asp:Button runat="server" ID="btnAddNewSchool" Text="New" OnClick="btnAddNewSchool_Click" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" valign="top">
                                <div>
                                    <asp:ValidationSummary ID="vsSchoolProfile" runat="server" ValidationGroup="SchoolProfile"
                                        ShowSummary="True" HeaderText="Please complete all highlighted fields of the form. Thank you."
                                        CssClass="errorSummary" />
                                    <asp:Label Visible="false" runat="server" Text="-1" ID="lblSchoolKey" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <h2>
                                    Name & Description</h2>
                                <div class="row_curved" id="divSchoolLogo" visible="false" runat="server">
                                    <label for="<%=imgSchoolLogo.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Logo" ID="Label3" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:HyperLink ID="hplSchoolLogo" Target="_blank" runat="server" ToolTip="Click to View Original">
                                                <asp:Image runat="server" ID="imgSchoolLogo" /></asp:HyperLink>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divSchoolPhoto" visible="false" runat="server">
                                    <label for="<%=imgSchoolPhoto.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Photo" ID="Label4" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:HyperLink ID="hplSchoolPhoto" Target="_blank" runat="server" ToolTip="Click to View Original">
                                                <asp:Image runat="server" ID="imgSchoolPhoto" />
                                            </asp:HyperLink>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divSchoolShortName" runat="server" title="Example:UCSM, MIT, YTU">
                                    <label for="<%=txtSchoolShortName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Short Name" ID="lblSchoolShortName" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtSchoolShortName" MaxLength="50" runat="server" />
                                            <asp:RequiredFieldValidator ID="rfvSchoolShortName" ValidationGroup="SchoolProfile"
                                                ControlToValidate="txtSchoolShortName" runat="server" CssClass="validationErrorControl"
                                                Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divShortName" runat="server">
                                    <label for="<%=txtSchoolName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Full Name" ID="lblSchoolName" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="270px" ID="txtSchoolName" MaxLength="255" runat="server" />
                                            <asp:RequiredFieldValidator ID="rfvSchoolName" ValidationGroup="SchoolProfile" ControlToValidate="txtSchoolName"
                                                runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divOtherSchoolName" runat="server">
                                    <label for="<%=txtOtherSchoolName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Other Name" ID="lblOtherSchoolName" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="270px" ID="txtOtherSchoolName" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divRemark" runat="server">
                                    <label for="<%=txtRemark.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Remark" ID="lblRemark" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox ID="txtRemark" Width="270px" Height="100px" Rows="5" Columns="50" TextMode="MultiLine"
                                                runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                            <td valign="top">
                                <h2>
                                    Registration Details</h2>
                                <div class="row_curved" id="divRegisterYear" runat="server">
                                    <label for="<%=txtRegisterYear.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Year of Registration" ID="lblRegisterYear" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="120px" ID="txtRegisterYear" MaxLength="4" runat="server" />
                                            <asp:RegularExpressionValidator ID="revRegisterYear" ValidationGroup="SchoolProfile"
                                                ControlToValidate="txtRegisterYear" runat="server" CssClass="validationErrorControl"
                                                Display="Dynamic" ErrorMessage="<br />Please type four digits year format." Text=""
                                                ValidationExpression="^[0-9]{4}$"></asp:RegularExpressionValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divOpenYear" runat="server">
                                    <label for="<%=txtOpenYear.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Year of Opening" ID="lblOpenYear" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="120px" ID="txtOpenYear" MaxLength="4" runat="server" />
                                            <asp:RegularExpressionValidator ID="revOpenYear" ValidationGroup="SchoolProfile"
                                                ControlToValidate="txtOpenYear" runat="server" CssClass="validationErrorControl"
                                                Display="Dynamic" ErrorMessage="<br />Please type 4 digits year format." Text=""
                                                ValidationExpression="^[0-9]{4}$"></asp:RegularExpressionValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divOwnerName" runat="server">
                                    <label for="<%=txtOwnerName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Owner/Founder's Name(s)" ID="lblOwnerName" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtOwnerName" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divHeadMasterName" runat="server">
                                    <label for="<%=txtHeadMasterName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Headmaster's Name(s)" ID="lblHeadMasterName" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtHeadMasterName" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divRegistrarName" runat="server">
                                    <label for="<%=txtRegistrarName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Registrar" ID="lblRegistrar" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtRegistrarName" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divRegistratinoNo" runat="server">
                                    <label for="<%=txtRegistratinoNo.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Registration No." ID="lblRegistratinoNo" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtRegistratinoNo" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <h2>
                                    Briefing Intro</h2>
                                <div class="row_curved" id="divSchoolBrief" runat="server">
                                    <label for="<%=txtSchoolBrief.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Brief" ID="lblSchoolBrief" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="270px" Height="100px" Rows="5" Columns="50" TextMode="MultiLine"
                                                ID="txtSchoolBrief" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divSchoolOtherBrief" runat="server">
                                    <label for="<%=txtSchoolOtherBrief.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Other Brief" ID="Label1" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="270px" Height="100px" Rows="5" Columns="50" TextMode="MultiLine"
                                                ID="txtSchoolOtherBrief" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                            <td valign="top">
                                <h2>
                                    Contact Information</h2>
                                <div class="row_curved" id="divWebsiteUrl" runat="server" title="Example:http://www.example.com">
                                    <label for="<%=txtWebsiteUrl.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Website URL" ID="lblWebsiteUrl" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="270px" ID="txtWebsiteUrl" MaxLength="255" runat="server">http://</asp:TextBox>
                                            <asp:RegularExpressionValidator ID="revWebsiteUrl" ValidationGroup="SchoolProfile"
                                                ControlToValidate="txtWebsiteUrl" runat="server" CssClass="validationErrorControl"
                                                Display="Dynamic" ErrorMessage="<br />Invalid HTTP URL format." Text="" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divEmailAddress" runat="server" title="Example:example@domain.com">
                                    <label for="<%=txtEmailAddress.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Email Address(es)" ID="lblEmailAddressCaption" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="270px" ID="txtEmailAddress" MaxLength="255" runat="server" />
                                            <asp:RegularExpressionValidator ID="revEmailAddress" ValidationGroup="SchoolProfile"
                                                ControlToValidate="txtEmailAddress" runat="server" CssClass="validationErrorControl"
                                                Display="Dynamic" ErrorMessage="<br />Invalid email address format." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divFaxNumber" runat="server">
                                    <label for="<%=txtFaxNumber.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Fax No(s)." ID="lblFaxNumber" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtFaxNumber" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divContactNo" runat="server">
                                    <label for="<%=txtContactNo.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Phone No(s)." ID="lblContactNo" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox Width="220px" ID="txtContactNo" MaxLength="255" runat="server" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div class="row_curved" style="background-color: #efefef;" id="divButton" runat="server">
                                    <label>
                                        &nbsp;</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:Button ID="btnSubmit" CssClass="button_normal_submit" Text="Save" ValidationGroup="SchoolProfile"
                                                OnClientClick="SubmitOnClientClick(this, 'SchoolProfile');" runat="server" OnClick="btnSubmit_Click" />
                                            &nbsp;&nbsp;<asp:Button ID="btnUpdateSchoolImage" CssClass="button_normal_submit" Visible="false"
                                                Text="Update Images" ValidationGroup="SchoolPhoto" CausesValidation="false" runat="server"
                                                OnClick="btnUpdateSchoolImage_Click" /></span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divMessage" runat="server">
                                    <label>
                                        &nbsp;</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:Label ID="lblMessage" runat="server"></asp:Label>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        //<![CDATA[
        SetSumitNormalButtonAttribute(document.getElementById('<%=btnSubmit.ClientID%>'));
        //]]>
    </script>

</asp:Content>
